﻿#ifndef STARTDIALOGITEMWIDGET_H
#define STARTDIALOGITEMWIDGET_H

#include <QWidget>
#include <QPoint>
#include <QMouseEvent>
#include <QString>
#include <QPixmap>
#include <QLabel>
#include <QGridLayout>

class StartDialogItemWidget : public QWidget
{
	Q_OBJECT

public:
	StartDialogItemWidget(QString name, QString desc, QPixmap img, QWidget *parent = nullptr);
	~StartDialogItemWidget();

	QString getTitle() const;
	QString getDesc() const;
signals:
	void clicked();
	void clicked(StartDialogItemWidget*);

protected:
	void mousePressEvent(QMouseEvent *ev);
	void mouseReleaseEvent(QMouseEvent *ev);
	void enterEvent(QEvent *event);
	void leaveEvent(QEvent *event);

private:
	QPoint m_MousePos;
	QLabel* m_Img = nullptr;
	QLabel* m_Title = nullptr;
	QLabel* m_Desc = nullptr;
	QGridLayout* m_Layout = nullptr;
};

#endif
